package com.my12306.user.dao.auth;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.my12306.user.model.po.auth.PermissionEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author:苏牧夕
 * @Date:2020-05-15 17:36:13
 * @Version 1.0
 */
@Mapper
public interface PermissionDao extends BaseMapper<PermissionEntity> {

    List<PermissionEntity> selectAllPermByUser_id(@Param("userId") long userId);

    List<String> queryPermissionByUserId(@Param("userId") long userId);

    List<Long> queryPermIdByParentId(@Param("parentId") Long parentId);

    void deleteBatchPermissionByIds(@Param("list") List<Long> allIds);
}
